package com.vip.buycart.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.vip.buycart.bl.OrderDetailBl;
import com.vip.buycart.entity.OrderDetail;
import com.vip.framework.generic.BaseDispatchAction;

/**
 * 订单明细的Action
 * 
 * @author sai
 *
 */
public class OrderDetailAction extends BaseDispatchAction {

	
	/**
	 * 查询最新成交动态显示的产品,在一个栏目里显示最近成交的商品(数量)总价
	 * 
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return 返回最新成交动态显示的产品
	 */
	public ActionForward list(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response){
		
		OrderDetailBl odBl=(OrderDetailBl)getBean("orderDetailBl");
		List<OrderDetail> bargains = odBl.searchBargain(null, 1, 3);
		request.setAttribute("bargains", bargains);
//		log.info("bargains is....................."+bargains);
		return mapping.findForward("success");
	} 
}
